home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / ControlStrip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  6.0 KB  |  164 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ControlStrip.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __CONTROLSTRIP__
  18. #define __CONTROLSTRIP__
  19.  
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __MENUS__
  27. #include <Menus.h>
  28. #endif
  29. /*    #include <Memory.h>                                            */
  30. /*        #include <MixedMode.h>                                    */
  31. /*    #include <Quickdraw.h>                                        */
  32. /*        #include <QuickdrawText.h>                                */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <OSUtils.h>                                    */
  35.  
  36. #ifndef __DIALOGS__
  37. #include <Dialogs.h>
  38. #endif
  39. /*    #include <Errors.h>                                            */
  40. /*    #include <Windows.h>                                        */
  41. /*        #include <Controls.h>                                    */
  42. /*    #include <TextEdit.h>                                        */
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. #if GENERATINGPOWERPC
  49. #pragma options align=mac68k
  50. #endif
  51.  
  52. #ifdef __CFM68K__
  53. #pragma lib_export on
  54. #endif
  55.  
  56.  
  57. enum {
  58.     sdevInitModule                = 0,                            /* initialize the module*/
  59.     sdevCloseModule                = 1,                            /* clean up before being closed*/
  60.     sdevFeatures                = 2,                            /* return feature bits*/
  61.     sdevGetDisplayWidth            = 3,                            /* returns the width of the module's display*/
  62.     sdevPeriodicTickle            = 4,                            /* periodic tickle when nothing else is happening*/
  63.     sdevDrawStatus                = 5,                            /* update the interface in the Control Strip*/
  64.     sdevMouseClick                = 6,                            /* user clicked on the module's display area in the Control Strip*/
  65.     sdevSaveSettings            = 7,                            /* saved any changed settings in module's preferences file*/
  66.     sdevShowBalloonHelp            = 8                                /* puts up a help balloon, if the module has one to display*/
  67. };
  68.  
  69. /*********************************************************************************************
  70.  
  71.     Features supported by the module.  If a bit is set, it means that feature is supported.
  72.     All undefined bits are reserved for future use by Apple, and should be set to zero.
  73.  
  74. *********************************************************************************************/
  75. enum {
  76.     sdevWantMouseClicks            = 0,                            /* notify the module of mouseDown events*/
  77.     sdevDontAutoTrack            = 1,                            /* call the module to do mouse tracking*/
  78.     sdevHasCustomHelp            = 2,                            /* module provides its own help messages*/
  79.     sdevKeepModuleLocked        = 3                                /* module needs to be locked in the heap*/
  80. };
  81.  
  82. /*********************************************************************************************
  83.  
  84.     Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
  85.     If a bit is set, the module can request that a specific function is performed by
  86.     the Control Strip.  A result of zero will do nothing.  All undefined bits are reserved
  87.     for future use by Apple, and should be set to zero.
  88.  
  89. *********************************************************************************************/
  90. enum {
  91.     sdevResizeDisplay            = 0,                            /* resize the module's display*/
  92.     sdevNeedToSave                = 1,                            /* need to save changed settings, when convenient*/
  93.     sdevHelpStateChange            = 2,                            /* need to update the help message because of a state change*/
  94.     sdevCloseNow                = 3                                /* close a module because it doesn't want to stay around*/
  95. };
  96.  
  97. /*********************************************************************************************
  98.  
  99.     miscellaneous
  100.  
  101. *********************************************************************************************/
  102. enum {
  103.     sdevFileType                = 'sdev'
  104. };
  105.  
  106. enum {
  107.     sdevMenuItemMark            = '•'
  108. };
  109.  
  110. /*    direction values for SBDrawBarGraph*/
  111. enum {
  112.     BarGraphSlopeLeft            = -1,                            /* max end of sloping bar graph is on the left*/
  113.     BarGraphFlatRight            = 0,                            /* max end of flat bar graph is on the right*/
  114.     BarGraphSlopeRight            = 1                                /* max end of sloping bar graph is on the right*/
  115. };
  116.  
  117. /*********************************************************************************************
  118.  
  119.     utility routines to provide standard interface elements and support for common functions
  120.  
  121. *********************************************************************************************/
  122. extern pascal Boolean SBIsControlStripVisible(void)
  123.  TWOWORDINLINE(0x7000, 0xAAF2);
  124. extern pascal void SBShowHideControlStrip(Boolean showIt)
  125.  THREEWORDINLINE(0x303C, 0x0101, 0xAAF2);
  126. extern pascal Boolean SBSafeToAccessStartupDisk(void)
  127.  TWOWORDINLINE(0x7002, 0xAAF2);
  128. extern pascal short SBOpenModuleResourceFile(OSType fileCreator)
  129.  THREEWORDINLINE(0x303C, 0x0203, 0xAAF2);
  130. extern pascal OSErr SBLoadPreferences(ConstStr255Param prefsResourceName, Handle *preferences)
  131.  THREEWORDINLINE(0x303C, 0x0404, 0xAAF2);
  132. extern pascal OSErr SBSavePreferences(ConstStr255Param prefsResourceName, Handle preferences)
  133.  THREEWORDINLINE(0x303C, 0x0405, 0xAAF2);
  134. extern pascal void SBGetDetachedIndString(StringPtr theString, Handle stringList, short whichString)
  135.  THREEWORDINLINE(0x303C, 0x0506, 0xAAF2);
  136. extern pascal OSErr SBGetDetachIconSuite(Handle *theIconSuite, short theResID, unsigned long selector)
  137.  THREEWORDINLINE(0x303C, 0x0507, 0xAAF2);
  138. extern pascal OSErr SBTrackPopupMenu(const Rect *moduleRect, MenuHandle theMenu)
  139.  THREEWORDINLINE(0x303C, 0x0408, 0xAAF2);
  140. extern pascal OSErr SBTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue)
  141.  THREEWORDINLINE(0x303C, 0x0409, 0xAAF2);
  142. extern pascal OSErr SBShowHelpString(const Rect *moduleRect, StringPtr helpString)
  143.  THREEWORDINLINE(0x303C, 0x040A, 0xAAF2);
  144. extern pascal short SBGetBarGraphWidth(short barCount)
  145.  THREEWORDINLINE(0x303C, 0x010B, 0xAAF2);
  146. extern pascal void SBDrawBarGraph(short level, short barCount, short direction, Point barGraphTopLeft)
  147.  THREEWORDINLINE(0x303C, 0x050C, 0xAAF2);
  148. extern pascal void SBModalDialogInContext(ModalFilterUPP filterProc, short *itemHit)
  149.  THREEWORDINLINE(0x303C, 0x040D, 0xAAF2);
  150.  
  151. #ifdef __CFM68K__
  152. #pragma lib_export off
  153. #endif
  154.  
  155. #if GENERATINGPOWERPC
  156. #pragma options align=reset
  157. #endif
  158.  
  159. #ifdef __cplusplus
  160. }
  161. #endif
  162.  
  163. #endif /* __CONTROLSTRIP__ */
  164.